import axios from '@/api'

/******************* 列表 *******************/
export function list(params) {
    return axios.request({
        url: '/laundry/departments/findByPage',
        method: 'post',
        data: params
    });
}
export function deptList(params) {
    return axios.request({
        url: '/laundry/departments/findByPage',
        method: 'post',
        data: params
    });
}

/******************* 详情 *******************/
export function info(id) {
    return axios.request({
        url: '/laundry/departments/findById/' + id,
        method: 'get'
    });
}

/******************* 添加 *******************/
export function add(data) {
    return axios.request({
        url: '/laundry/departments/save',
        method: 'post',
        data: data
    });
}

/******************* 树状菜单 *******************/
// export function treeList(id) {
//     return axios.request({
//         url: '/sys/dept-treeList/' + id,
//         method: 'get',
//     });
// }

/******************* 编辑 *******************/
export function update(data) {
    return axios.request({
        url: '/laundry/departments/modify',
        method: 'put',
        data: data,

    });
}

/******************* 删除 *******************/
export function del(id) {
    return axios.request({
        url: '/laundry/departments/removeById/'+id,
        method: 'delete'
    });
}
